Repository navigation
QVAC-27164 feat[api|bc]: support EmbeddingGemma 2 multimodal embeddings - #5464
Conversation
License compliance — cleanNo new dependency license findings in this PR. Warn-only (shadow) mode — this check does not block merges yet. Updated automatically by the canonical license compliance workflow. NOTICE presence (advisory)Missing NOTICE (advisory, does not block):
|
Review StatusCurrent Status: ❌ PENDING Pending reviews: Needs 1 Management or Team Lead. |
539e642 to
9c4b45b
Compare
[Medium impact] The PR appears safe to merge; no new actionable issue was found. SummaryAdds library-only text, image, and audio embeddings with EmbeddingGemma 2 while preserving existing text calls.
|
cb9fb86 to
c367ca9
Compare
QVAC E2E — base run recordedBase: run 41661064462 · suite
All recorded platforms are green — nothing for |
QVAC E2E — tests changed by this PRThis smoke run additionally covers 89 test(s) that are not tagged Catalog: 624 tests · smoke: 124 · touched by this PR: 129 (40 already in smoke)
89 added test id(s)These changed files map to no test, so nothing was added for them — review by hand if they affect behaviour:
|
QVAC E2E —
|
QVAC E2E —
|
QVAC E2E —
|
QVAC E2E —
|
QVAC E2E —
|
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
2c66681 to
e9a8bc4
Compare
lauripiisang
left a comment
There was a problem hiding this comment.
The way we do e2e is a bit different now so the implementation should be changed to match there, plus the schemas could use titles so they get better naming in generated code.
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
Signed-off-by: Maksim Smatrou <maxim.smotrov@itrexgroup.com>
🎯 What problem does this PR solve?
SDK doesn't provide support for EmbeddingGemma 2 for multi-modal embeddings. The addon already added support in #5237.
📝 How does it solve it?
inputsbatches with text, file-path media, and base64 media while preserving the existingtextcalls.🧪 How was it tested?
💥 Breaking Changes
The generated Kotlin and Python
EmbedRequesttypes now represent two alternatives.EmbedTextRequestrequirestextand forbidsinputs.EmbedInputsRequestrequiresinputsand forbidstext.A single object with optional
textandinputswould keep the old constructors, but its Zod refinement requiring exactly one field would not appear in the exported JSON Schema. Generated clients could then accept both fields or neither. With the union, Kotlin callers must select a variant with a required input field, and Python rejects both or neither during model validation, before RPC. The cost is the generated-client migration below. ExistingQvacEmbeddings.embedconvenience methods remain unchanged.The TypeScript
embed()overloads preserve precise result types:text: stringreturns one vector, whiletext: string[]andinputsreturn a batch of vectors. These overloads do not cause the generated-client migration; the request schema union does. Existing TypeScript text calls remain supported.Kotlin
Direct construction of
EmbedRequestnow requires a request variant wrapper. The text value type is renamed fromEmbedRequestTexttoEmbedTextRequestText.BEFORE:
AFTER:
For text batches, use
EmbedTextRequestText.Variant2(texts)inside the same wrapper. For multimodal batches, useEmbedRequest.EmbedInputsRequestwrapping anEmbedInputsRequest. When inspecting a request typed asEmbedRequest, select the variant and read its fields through.value.The existing
QvacEmbeddings.embed(modelId, text)andembed(modelId, texts)convenience methods remain supported and need no caller migration.Python
The existing keyword constructor still works.
EmbedRequestis now a PydanticRootModelcontaining the selected request variant, so direct.model_id,.text, and.request_idaccess must move under.root.BEFORE:
AFTER:
For the
inputsvariant, readrequest.root.inputsafter selecting that variant. Continue passing the outerrequesttoembed(transport, request); do not replace it withrequest.root. Wire serialization remains flat, with norootorvaluefield added to the RPC payload.🔌 API Changes
Load the model with
modelConfig.projectionModelSrc, then pass text and media inputs:The result contains one vector per input.